#ifndef ROBOTPROJECT_H_
#define ROBOTPROJECT_H_

#include "Robot.h"
#include <iostream>

#define MAX_ROBOTS 10 

using namespace std;

class RobotProject
{
	private:
	
		/**
		 * \brief The created robots to use in the project
		 */
		Robot* robotArray[MAX_ROBOTS];
		/**
		 * \brief The color of the obstacles. There is no obstacles class, only color is needed.
		 */
		nxColor* obstColor;
		/**
		 * \brief number of robots added to the array. It is always less than MAX_ROBOT constant.
		 */
		int numRobots;
	
	public:
	
		/**
		* \brief Constructor of the class
		* 
		* This class is used to organize and configure the attributes of robots and 
		* obstacles to be identified by the vision system. It is only possible to configure
		* up to ten (10) robots, but this can be changed, redefining MAX_ROBOTS constant.
		* At the time, the only attribute used for obstacles is its color. There is no class
		* defining obstacles.
		* 
		*/
		RobotProject();
		~RobotProject();
		inline Robot** getRobotArray(){ return this->robotArray;}
		inline nxColor* getObstColor(){ return this->obstColor;}
		inline int getNumRobots(){ return this->numRobots;}
		
		inline void setObstColor(nxColor* obstColor){}
		
		/**
		* \brief Used to add a robot to the list
		* 
		* The given robot will be added to the end of the array. 
		* The variable <i>numRobots</i> will be incremented.
		* 
		* \param robot The robot to be appended to the robot array.
		* \return true if the robot was added successfully, false if not.
		*/
		bool appendRobot(Robot* robot);
		
		/**
		* \brief Used to remove a robot to the list
		* 
		* The robot at the given index will be removed off of the array.
		* It is not (yet) implemented.
		* 
		* \param index the index of the robot to be removed off of the robot array.
		* \return true if the robot was removed successfully, false if not.
		*/
		bool removeRobot(int index);
		
		/**
		* \brief Used to remove a robot to the list
		* 
		* The robot with the given name will be removed off of the array.
		* It is not (yet) implemented.
		* 
		* \param name the name of the robot to be removed off of the robot array.
		* \return true if the robot was removed successfully, false if not.
		*/
		bool removeRobot(char* name);
	
	private:
	
		/**
		* \brief Used to get the index of a robot, given the robots name
		* 
		* 
		* \param name Name of the robot to be searched
		* \return index of the robot, or -1 if there were no match
		*/
		int getRobotIndex(char* name);
		

};
#endif /*ROBOTPROJECT_H_*/
